package birdsVSZombiesServer;

import java.util.ArrayList;

import shared.BVZConstants;

import birdsVSZombiesComponents.Birds;
import birdsVSZombiesComponents.Zombies;

public class Gameover {
	
	public Gameover(){
		
	}
	
	public boolean isGameover(ArrayList<Birds> birds, ArrayList<Zombies> zombies){
		
		if(birds.size() == 0 || zombies.size() == 0){
//			System.out.println("gameover");
			return true;
		}
		else{
			return false;
		}
	}
	
	public int whoIsTheWinner(ArrayList<Birds> birds, ArrayList<Zombies> zombies){
		
		if(birds.size() == 0){
			return BVZConstants.ZOMBIESDEFENDER;
		}
		else if(zombies.size() == 0){
			return BVZConstants.BIRDSSHOOTER;
		}
		else if(birds.size() == 0 && zombies.size() == 0){
			return BVZConstants.NOROLE;
		}
		else{
			return BVZConstants.SOMETHINGWRONGWITHTHERESULT;
		}
	}
}
